<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
    <style>
        #div1{width: 600px;height: 400px;margin: auto;}
        #div2{width: 600px;height: 400px;margin: auto;}
    </style>
</head>
<body>
<div id="div1">
    <form role="form" action="upload.php?submit=on" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="exampleInputFile">File input</label>
            <input type="file" id="exampleInputFile" name="filename">
        </div>
        <input type="hidden" name="MAX_FILE_SIZE" value="30000">
        <input type="submit" class="btn btn-default" value="submit">
    </form>
</div>
<div id="div2">
    <form action="file.php" method="post" enctype="multipart/form-data">
        <input type="file" name="pic[]"><br />
        <div id="new_file"></div>
        <input type="button" name="add_img" value="新增上传" onclick="go_up()" class="input">
        <input type="button" name="del_img" value="删除" onclick="go_del()">
        <input type="submit" value="submit" name="sel">
    </form>
</div>

<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
    function go_up(){
        document.getElementById('new_file').innerHTML +='<input type="file" name="pic[]" class="int"><br />'
    }
    function go_del(){
        document.getElementById('new_file').style.display='none';
    }
</script>
</body>
</html>